<?php
defined('SEJUJOPEFDNGJSL') or exit('Access denied');
$_username='tianxiayhe';
$tmp_arr['toption'].='<a href="'.YMCURL.'sjxlist" class="thabtn">返回收件箱</a><a href="'.YMCURL.'fjxlist" class="thabtn">返回发件箱</a><input type="submit" name="submit" value="点击发送" class="thabtn">';
//print_r($_username);exit;
if($_POST['submit']=='点击发送'){
    //print_r($_POST);exit;
	$arr['uname']=$_POST['uname'];
	$arr['user_name']=$_POST['user_name'];
        $arr['msubject']=$_POST['msubject'];
	$arr['madd_time']=time();
	$arr['title']=$_POST['title'];
	$arr['content']=$_POST['content'];
	$sql = getinsertsql($arr,'ld_message ');
	$db->sitedbexec($sql);
	record_log("发送邮件",0);
	msg_b("发送成功");
}


?>
<h3><?php echo getmenu($GLOBALARR['menu'],'sendemail')?></h3>
<form method="post" action="<?=geturl()?>">
	<div class="main-r-item" ><?=$tmp_arr['toption']?></div>
        <input type="hidden" name="uname"  value="<?php echo $_username ?>"/>
        <input type="hidden" name="msubject"  value="31"/>
	<table class=" ttab">
		<tbody>
			<tr style="display:none">
				<td>邮件类型</td>
				<td><?php echo getmessagetype(array(2))?></td>
			</tr>
			
			<tr>
				<td>邮件标题</td>
				<td>
					<input class="" style="color:#333" type="text" name="title"  value=""/>
				</td>
			</tr>
			<tr>
				<td>目标用户名</td>
				<td><input style="color:#333" type="text" name="user_name"  value=""/></td>
			</tr>
			
			<tr>
				<td>发送内容</td>
				<td><textarea name="content" style="width:200px;height:100px;color:#333"></textarea></td>
			</tr>
		</tbody>		
	</table>
	
	</div>
</form>



